package com.macro.mall.service.impl;

import com.macro.mall.model.TitleRes;

import com.macro.mall.mapper.TitleMapper;
import com.macro.mall.model.PmsTitle;
import com.macro.mall.service.TitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TitleServiceImpl implements TitleService {
    @Autowired
    private TitleMapper mapper;
    /**
     * 添加
     */
    @Override
    public void addTitle(PmsTitle title) {
         mapper.addTitle(title);
    }
    /**
     * 修改
     */
    @Override
    public void updTitle(PmsTitle title) {
         mapper.updTitle(title);
    }
    /**
     * 删除
     */
    @Override
    public void del(Integer id) {
         mapper.del(id);
    }
    /**
     * 回显
     */
    @Override
    public PmsTitle byid(Integer id) {
        PmsTitle title = mapper.byid(id);
        return title;
    }

    /**
     * 商品标签列表
     */
    @Override
    public List<PmsTitle> titleList(Integer cid) {
        List<PmsTitle> list = mapper.titleList(cid);
        return list;
    }
}
